<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Yac class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="yac.constants.html">« 预定义常量</a></li>
      <li style="float: right;"><a href="yac.add.html">Yac::add »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.yac.html">Yac</a></li>
    <li>The Yac class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.yac" class="reference">

 <h1 class="title">The Yac class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL yac &gt;= 1.0.0)</p>


  <div class="section" id="yac.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="yac.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">Yac</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yac.html#yac.props.prefix">$<var class="varname">_prefix</var></a></var>;</div>


    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="yac.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code><span class="initializer"> = &quot;&quot;</span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.add.html" class="methodname">add</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$ttl</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.add.html" class="methodname">add</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$key_vals</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.delete.html" class="methodname">delete</a></span>(<span class="methodparam"><span class="type"><span class="type">string</span>|<span class="type">array</span></span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$ttl</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.dump.html" class="methodname">dump</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$$num</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.flush.html" class="methodname">flush</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.get.html" class="methodname">get</a></span>(<span class="methodparam"><span class="type"><span class="type">string</span>|<span class="type">array</span></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$cas</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.getter.html" class="methodname">__get</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.info.html" class="methodname">info</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.set.html" class="methodname">set</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$ttl</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.add.html" class="methodname">add</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$key_vals</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yac.setter.html" class="methodname">__set</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>

   }</div>


  </div>

  

  <div class="section" id="yac.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="yac.props.prefix"><var class="varname">_prefix</var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
   </dl>

  </div>



 </div>

 







































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="yac.add.html">Yac::add</a> — Store into cache</li><li><a href="yac.construct.html">Yac::__construct</a> — Constructor</li><li><a href="yac.delete.html">Yac::delete</a> — Remove items from cache</li><li><a href="yac.dump.html">Yac::dump</a> — Dump cache</li><li><a href="yac.flush.html">Yac::flush</a> — Flush the cache</li><li><a href="yac.get.html">Yac::get</a> — Retrieve values from cache</li><li><a href="yac.getter.html">Yac::__get</a> — Getter</li><li><a href="yac.info.html">Yac::info</a> — Status of cache</li><li><a href="yac.set.html">Yac::set</a> — Store into cache</li><li><a href="yac.setter.html">Yac::__set</a> — Setter</li></ul>
</div>
</div></div></body></html>